//package com.wms.gateway.config;
//
//import org.springframework.cloud.gateway.route.RouteLocator;
//import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
//import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder.Builder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.stereotype.Component;
//
///**
// * @author: liuchao
// * @description:
// */
//@Component
//@Configuration
//public class RouteConfig {
//
//    @Bean
//    RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
//    	Builder routeBuild = builder.routes();
//    	addRoute(routeBuild,"wms-storage-service");
//    	addRoute(routeBuild,"wms-server-service");
//    	addRoute(routeBuild,"wms-base-service");
//        return routeBuild.build();
//    }
//    
//    private void addRoute(RouteLocatorBuilder.Builder routeBuild,String serviceName) {
//    	routeBuild.route(serviceName, p -> p
//                .path("/"+serviceName+"/**")
//                .uri("lb://"+serviceName));
////    	routeBuild.route(serviceName+"_swagger", p -> p
////                .path("/swagger/"+serviceName)
////                .filters(f -> f.rewritePath("/swagger/(?<segment>.*)", "/v2/api-docs?group=${segment}"))
////                .uri("lb://"+serviceName));
//    }
//}
